package com.fxp.landing;

import java.awt.Color;
import java.awt.Font;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.Closeable;
import java.io.InputStream;

import javax.print.DocFlavor.URL;
import javax.swing.Icon;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JPasswordField;
import javax.swing.JTextField;

public class LS extends JFrame {

	JLabel btn1, btn2, btn4;
	JButton btn3, btn5;

	JPanel p = new JPanel();

	public LS() {

		super("管理员登录系统");
		p.setLayout(null);
		btn1 = new JLabel("账号");
		btn2 = new JLabel("密码");
		btn3 = new JButton("登     录");
		// btn4=new JLabel();
		btn5 = new JButton("返回");

		p.setBackground(Color.gray);
		btn1.setBounds(150, 230, 100, 20);
		btn1.setFont(new Font("仿宋", WIDTH, 20));

		JTextField T1 = new JTextField(20);
		T1.setBounds(210, 228, 200, 30);
		JPasswordField T2 = new JPasswordField(20);
		T2.setBounds(210, 298, 200, 30);
		btn2.setBounds(150, 300, 100, 20);
		btn2.setFont(new Font("仿宋", WIDTH, 20));
		btn5.setBounds(10, 20, 60, 25);
		btn3.setBounds(240, 350, 100, 40);
		// java.net.URL url=LS.class.getResource("1.jpeg");
		// Icon icon=new ImageIcon(url);
		// btn4.setIcon(icon);
		// btn4.setBounds(0, 0, 500, 600);

		p.add(btn1);
		p.add(btn2);
		add(btn3);
		add(T1);
		add(T2);
		add(btn5);
		// add(btn4);
		this.add(p);
		this.setVisible(true);
		setLocation(400, 500);
		setSize(600, 500);
		this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setVisible(true);
		btn5.addActionListener(new ActionListener() {

			@Override
			public void actionPerformed(ActionEvent e) {
				setVisible(false);
				Interfsce in = new Interfsce();
			}
		});

	}

	public static void main(String[] args) {
		new LS();
	}

}
